<!DOCTYPE html>
<html>
    <head>
        <?php //echo $this->headTitle(); ?>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

        <!-- bootstrap -->
        <link href="<?php echo $this->CSS_PATH; ?>bootstrap/bootstrap.css" rel="stylesheet" />
        <link href="<?php echo $this->CSS_PATH; ?>bootstrap/bootstrap-responsive.css" rel="stylesheet" />
        <link href="<?php echo $this->CSS_PATH; ?>bootstrap/bootstrap-overrides.css" type="text/css" rel="stylesheet" />

        <link href="<?php echo $this->CSS_PATH; ?>compiled/personal-info.css" type="text/css" rel="stylesheet" />

        <!-- libraries -->
        <link href="<?php echo $this->CSS_PATH; ?>lib/jquery-ui-1.10.2.custom.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo $this->CSS_PATH; ?>lib/font-awesome.css" type="text/css" rel="stylesheet" />
        <link href="<?php echo $this->CSS_PATH; ?>lib/bootstrap.datepicker.css" type="text/css" rel="stylesheet" />
        <link href="<?php echo $this->CSS_PATH; ?>lib/select2.css" type="text/css" rel="stylesheet" />
        <!-- global styles -->
        <link rel="stylesheet" type="text/css" href="<?php echo $this->CSS_PATH; ?>compiled/layout.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo $this->CSS_PATH; ?>compiled/elements.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo $this->CSS_PATH; ?>compiled/icons.css" />


        <!-- this page specific styles -->
        <link rel="stylesheet" href="<?php echo $this->CSS_PATH; ?>compiled/index.css" type="text/css" media="screen" />    
        <!--add New css-->
        <link rel="stylesheet" type="text/css" href="<?php echo $this->CSS_PATH; ?>developer.css" />

        <!-- open sans font -->
        <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css' />

        <!-- lato font -->
        <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700,900,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css' />

        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        
        
        
        <title>FMS</title>
        <?php
        echo $this->headLink();
        ?>
        <script>
            var BASE_PATH = '<?php echo BASE_PATH; ?>';
            var SITE_URL = '<?php echo $this->BASE_URL . ""; ?>';
        </script>

    </head>
    <body>

        <!-- navbar -->
        <div class="navbar navbar-inverse">
            <div class="navbar-inner">
                <button type="button" class="btn btn-navbar visible-phone" id="menu-toggler">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>

                <a class="brand" href="<?php echo $this->url(array('module' => 'default', 'controller' => 'loan', 'action' => 'index'), null, TRUE); ?>">
                    FMS</a>

                <ul class="nav pull-right">    
                   
                    <li class="notification-dropdown hidden-phone">
                    <a class="trigger" href="#">
                        <i class="icon-warning-sign"></i>
                        <div class="notification-container">
                        <?php if($this->REMINDERCOUNT != 0):?>
                        <span id="notification_count" class="notification_count count"><?php echo $this->REMINDERCOUNT;?></span>
                        <?php endif;?>
                        </div>
                    </a>
                    <?php if($this->REMINDERCOUNT != 0):?>
                    <div class="pop-dialog notification-container">
                        <div class="pointer right">
                            <div class="arrow"></div>
                            <div class="arrow_border"></div>
                        </div>
                        <div class="body">
                            <a class="close-icon" href="#"><i class="icon-remove-sign"></i></a>
                            <div class="notifications">
                                <h3>You have <span class="notification_count"><?php echo $this->REMINDERCOUNT;?></span> new notifications</h3>
                                <?php foreach($this->REMINDERARRAY as $key => $value):?>
                                    <a class="item notification_id_<?php echo $value["rm_id"];?>" href="<?php echo $this->url(array('module' => 'default', 'controller' => 'reminder', 'action' => 'form','rm_id' => $value["rm_id"],'rm_status'=>'read'), null, TRUE); ?>">
                                        <i class="icon-signin"></i> <?php echo ucfirst($value['rm_title']);?>
                                        <span class="time"><i class="icon-time"></i><?php echo $value['rm_date'];?></span>
                                    </a>
                                <?php endforeach;?>
                                <div class="footer">
                                    <a class="logout" href="<?php echo $this->url(array('module' => 'default', 'controller' => 'reminder', 'action' => 'list'), null, TRUE); ?>">View all notifications</a>
                                </div>
                            </div>
                        </div>
                    </div>
                  <?php endif;?>
                </li>
                <li class="dropdown">
                    <a data-toggle="dropdown" class="dropdown-toggle hidden-phone" href="#">
                        My Account                        
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                       <li><a href="<?php echo $this->url(array('module' => 'default', 'controller' => 'admin', 'action' => 'editprofile'), null, TRUE); ?>"> Edit Profile</a></li>
                        
                    </ul>
                </li>
                
                <li class="settings hidden-phone">
                        <a href="<?php echo $this->url(array('module' => 'default', 'controller' => 'logout', 'action' => 'index'), null, TRUE); ?>" role="button">

                            <i class="icon-share-alt"></i>
                        </a>
                    </li>
                </ul>            
            </div>
        </div>
        <!-- end navbar -->

        <!-- sidebar -->
        <div id="sidebar-nav">
            <ul id="dashboard-menu">
            <!-- Agent MENU-----> 
                <li <?php if ($this->CONTROLLER_NAME == 'agent' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form' || $this->ACTION_NAME == 'view')): ?> class="active" <?php endif; ?>>
                   <?php if (($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form')): ?> 
                        <div class="pointer">
                            <div class="arrow"></div>
                            <div class="arrow_border"></div>
                        </div>
                   <?php endif; ?>
                    <a href="<?php echo $this->url(array('module' => 'default', 'controller' => 'agent', 'action' => 'list'), null, TRUE); ?>" class="dropdown-toggle">
                        <i class="icon-user"></i>
                        <span onclick="window.location = '<?php echo $this->url(array('module' => 'default', 'controller' => 'agent', 'action' => 'list'), null, TRUE); ?>'">
                            Agent</span>
                        <i class="icon-chevron-down"></i>
                    </a>
                    <ul class="submenu" <?php if ($this->CONTROLLER_NAME == 'agent' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form' || $this->ACTION_NAME == 'view')): ?> style="display: block;"<?php else: ?>style="display: none;" <?php endif; ?>>
                        <li><a <?php if ($this->CONTROLLER_NAME == 'agent' && $this->ACTION_NAME == 'list'): ?> class="active" <?php endif; ?> href="<?php echo $this->url(array('module' => 'default', 'controller' => 'agent', 'action' => 'list'), null, TRUE); ?>">Agent List</a></li>
                        <li><a <?php if ($this->CONTROLLER_NAME == 'agent' && $this->ACTION_NAME == 'form'): ?> class="active" <?php endif; ?>href="<?php echo $this->url(array('module' => 'default', 'controller' => 'agent', 'action' => 'form'), null, TRUE); ?>">Add Agent</a></li>
                    </ul>
                </li>
              
                
                 <!-- Customer MENU-----> 
                <li <?php if ($this->CONTROLLER_NAME == 'customer' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form' || $this->ACTION_NAME == 'view')): ?> class="active" <?php endif; ?>>
                    <?php if ($this->CONTROLLER_NAME == 'customer' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form')): ?> 
                        <div class="pointer">
                            <div class="arrow"></div>
                            <div class="arrow_border"></div>
                        </div>
                    <?php endif; ?>
                    <a href="<?php echo $this->url(array('module' => 'default', 'controller' => 'customer', 'action' => 'list'), null, TRUE); ?>" class="dropdown-toggle">
                        <i class="icon-group"></i>
                        <span onclick="window.location = '<?php echo $this->url(array('module' => 'default', 'controller' => 'customer', 'action' => 'list'), null, TRUE); ?>'">
                            Customer</span>
                        <i class="icon-chevron-down"></i>
                    </a>
                    <ul class="submenu" 
                        <?php if ($this->CONTROLLER_NAME == 'customer' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form' || $this->ACTION_NAME == 'view')): ?> style="display: block;"<?php else: ?>style="display: none;" <?php endif; ?>>
                        <li><a <?php if ($this->CONTROLLER_NAME == 'customer' && $this->ACTION_NAME == 'list'): ?> class="active" <?php endif; ?> href="<?php echo $this->url(array('module' => 'default', 'controller' => 'customer', 'action' => 'list'), null, TRUE); ?>">Customer List</a></li>
                        <li><a <?php if ($this->CONTROLLER_NAME == 'customer' && $this->ACTION_NAME == 'form'): ?> class="active" <?php endif; ?>href="<?php echo $this->url(array('module' => 'default', 'controller' => 'customer', 'action' => 'form'), null, TRUE); ?>">Add Customer</a></li>
                    </ul>
                </li>
                
                <!-- Loan MENU-----> 
                <li <?php if ($this->CONTROLLER_NAME == 'loan' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form' || $this->ACTION_NAME == 'view')): ?> class="active" <?php endif; ?>>
                    <?php if ($this->CONTROLLER_NAME == 'loan' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form')): ?> 
                        <div class="pointer">
                            <div class="arrow"></div>
                            <div class="arrow_border"></div>
                        </div>
                    <?php endif; ?>
                    <a href="<?php echo $this->url(array('module' => 'default', 'controller' => 'loan', 'action' => 'list'), null, TRUE); ?>" class="dropdown-toggle">
                        <i class="icon-retweet"></i>
                         <span onclick="window.location = '<?php echo $this->url(array('module' => 'default', 'controller' => 'loan', 'action' => 'list'), null, TRUE); ?>'">
                            Loan</span>
                        <i class="icon-chevron-down"></i>
                    </a>
                    <ul class="submenu" 
                        <?php if ($this->CONTROLLER_NAME == 'loan' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form' || $this->ACTION_NAME == 'view')): ?> style="display: block;"<?php else: ?>style="display: none;" <?php endif; ?>>
                        <li><a <?php if ($this->CONTROLLER_NAME == 'loan' && $this->ACTION_NAME == 'list'): ?> class="active" <?php endif; ?> href="<?php echo $this->url(array('module' => 'default', 'controller' => 'loan', 'action' => 'list'), null, TRUE); ?>">Loan List</a></li>
                        <li><a <?php if ($this->CONTROLLER_NAME == 'loan' && $this->ACTION_NAME == 'form'): ?> class="active" <?php endif; ?>href="<?php echo $this->url(array('module' => 'default', 'controller' => 'loan', 'action' => 'form'), null, TRUE); ?>">Add Loan</a></li>
                    </ul>
                </li>
                
                
                <!-- Installment MENU-----> 
                <li <?php if ($this->CONTROLLER_NAME == 'installment' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form' || $this->ACTION_NAME == 'view')): ?> class="active" <?php endif; ?>>
                    <?php if ($this->CONTROLLER_NAME == 'installment' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form')): ?> 
                        <div class="pointer">
                            <div class="arrow"></div>
                            <div class="arrow_border"></div>
                        </div>
                    <?php endif; ?>
                    <a href="<?php echo $this->url(array('module' => 'default', 'controller' => 'installment', 'action' => 'list'), null, TRUE); ?>" class="dropdown-toggle">
                        <i class="icon-tasks"></i>
                        <span onclick="window.location = '<?php echo $this->url(array('module' => 'default', 'controller' => 'installment', 'action' => 'list'), null, TRUE); ?>'">
                            Installment
                        </span>
                        <i class="icon-chevron-down"></i>
                    </a>
                    <ul class="submenu" 
                        <?php if ($this->CONTROLLER_NAME == 'installment' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form' || $this->ACTION_NAME == 'view')): ?> style="display: block;"<?php else: ?>style="display: none;" <?php endif; ?>>
                        <li><a <?php if ($this->CONTROLLER_NAME == 'installment' && $this->ACTION_NAME == 'list'): ?> class="active" <?php endif; ?> href="<?php echo $this->url(array('module' => 'default', 'controller' => 'installment', 'action' => 'list'), null, TRUE); ?>">Installment List</a></li>
                        <li><a <?php if ($this->CONTROLLER_NAME == 'installment' && $this->ACTION_NAME == 'form'): ?> class="active" <?php endif; ?>href="<?php echo $this->url(array('module' => 'default', 'controller' => 'installment', 'action' => 'form'), null, TRUE); ?>">Add Installment</a></li>
                    </ul>
                </li>
                
                
                
                <!-- Reminder MENU-----> 
                <li <?php if ($this->CONTROLLER_NAME == 'reminder' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form' || $this->ACTION_NAME == 'view')): ?> class="active" <?php endif; ?>>
                    <?php if ($this->CONTROLLER_NAME == 'reminder' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form')): ?> 
                        <div class="pointer">
                            <div class="arrow"></div>
                            <div class="arrow_border"></div>
                        </div>
                    <?php endif; ?>
                    <a href="<?php echo $this->url(array('module' => 'default', 'controller' => 'reminder', 'action' => 'list'), null, TRUE); ?>" class="dropdown-toggle">
                        <i class="icon-bell"></i>
                        <span onclick="window.location = '<?php echo $this->url(array('module' => 'default', 'controller' => 'reminder', 'action' => 'list'), null, TRUE); ?>'">
                            Reminder
                        </span>
                        <i class="icon-chevron-down"></i>
                    </a>
                    <ul class="submenu" 
                        <?php if ($this->CONTROLLER_NAME == 'reminder' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form' || $this->ACTION_NAME == 'view')): ?> style="display: block;"<?php else: ?>style="display: none;" <?php endif; ?>>
                        <li><a <?php if ($this->CONTROLLER_NAME == 'reminder' && $this->ACTION_NAME == 'list'): ?> class="active" <?php endif; ?> href="<?php echo $this->url(array('module' => 'default', 'controller' => 'reminder', 'action' => 'list'), null, TRUE); ?>">Reminder List</a></li>
                        <li><a <?php if ($this->CONTROLLER_NAME == 'reminder' && $this->ACTION_NAME == 'form'): ?> class="active" <?php endif; ?>href="<?php echo $this->url(array('module' => 'default', 'controller' => 'reminder', 'action' => 'form'), null, TRUE); ?>">Add Reminder</a></li>
                    </ul>
                </li>
                
                
                <!-- Report MENU-----> 
                <li <?php if ($this->CONTROLLER_NAME == 'report' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form' || $this->ACTION_NAME == 'view')): ?> class="active" <?php endif; ?>>
                    <?php if ($this->CONTROLLER_NAME == 'report' && ($this->ACTION_NAME == 'list' || $this->ACTION_NAME == 'form')): ?> 
                        <div class="pointer">
                            <div class="arrow"></div>
                            <div class="arrow_border"></div>
                        </div>
                    <?php endif; ?>
                    <a href="<?php echo $this->url(array('module' => 'default', 'controller' => 'report', 'action' => 'download'), null, TRUE); ?>" class="dropdown-toggle">
                        <i class="icon-download"></i>
                        <span onclick="window.location = '<?php echo $this->url(array('module' => 'default', 'controller' => 'report', 'action' => 'download'), null, TRUE); ?>'">
                            Report
                        </span>
                        <i class="icon-chevron-down"></i>
                    </a>
                    <ul class="submenu" 
                        <?php if ($this->CONTROLLER_NAME == 'report' && ($this->ACTION_NAME == 'download' )): ?> style="display: block;"<?php else: ?>style="display: none;" <?php endif; ?>>
                        <li><a <?php if ($this->CONTROLLER_NAME == 'report' && $this->ACTION_NAME == 'download'): ?> class="active" <?php endif; ?> href="<?php echo $this->url(array('module' => 'default', 'controller' => 'report', 'action' => 'download'), null, TRUE); ?>">Download Report</a></li>
                    </ul>
                </li>
                
                
                
               <!-- Logout MENU-----> 
                <li>

                    <a href="<?php echo $this->url(array('module' => 'default', 'controller' => 'logout', 'action' => 'index'), null, TRUE); ?>">
                        <i class="icon-unlock"></i>
                        <span>Logout</span>
                    </a>
                </li>				




            </ul>
        </div>
        <!-- end sidebar -->

        <!-- main container -->
        <div class="content">
            <?php echo $this->layout()->content; ?>
        </div>

        <!-- scripts -->

        <script src="<?php echo $this->JS_PATH; ?>jquery-1.10.2.js"></script>
        <script src="<?php echo $this->JS_PATH; ?>bootstrap.min.js"></script>
        <script src="<?php echo $this->JS_PATH; ?>jquery-ui-1.10.2.custom.min.js"></script>
        <script src="<?php echo $this->JS_PATH; ?>theme.js"></script>
        <script src="<?php echo $this->JS_PATH; ?>project.js"></script>
        <script src="<?php echo $this->JS_PATH; ?>select2.min.js"></script>
       

        <?php
        echo $this->headScript();
        ?>

    </body>
</html>
